Skip to content

add proper example gallery#194

Merged
thomasp85 merged 2 commits intoposit-dev:mainfrom
thomasp85:gallery
Mar 12, 2026
Merged

add proper example gallery#194
thomasp85 merged 2 commits intoposit-dev:mainfrom
thomasp85:gallery

Conversation

@thomasp85
Copy link
Collaborator

@thomasp85 thomasp85 commented Mar 12, 2026

This is mainly about the look and organisation. We can most certainly improve the examples included and add more. But I'd rather have this stub onthe site than the current examples page

@thomasp85 thomasp85 requested a review from teunbrand March 12, 2026 12:03
@thomasp85 thomasp85 added this to the alpha-release milestone Mar 12, 2026
@thomasp85
Copy link
Collaborator Author

BTW, we must certainly want better rendered thumbnails that are in a more square aspect ratio... but since the actual example may change a bit as we polish I'd rather not fret it. Best would be if we could script ourselves out of it

Copy link
Collaborator

@georgestagg georgestagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a great start!

There's some issues with facet plots, we might want to consider removing them from the gallery (or commenting out?) until we fix them.

Other than the merge conflict, LGTM.

Comment on lines +36 to +48
Use `PROJECT y, x TO cartesian` to flip the axes for horizontal bars:

```{ggsql}
SELECT species, COUNT(*) as count FROM ggsql:penguins
GROUP BY species
VISUALISE species AS x, count AS y, species AS fill
DRAW bar
PROJECT y, x TO cartesian
LABEL
title => 'Penguin Count by Species',
x => 'Species',
y => 'Count'
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This didn't work yet for me, but I know that's expected until the related PR merges.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it's in anticipation of #183

order: 6
---

Faceted plots (small multiples) split data into separate panels by one or more categorical variables. This makes it easy to compare patterns across groups.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These plots did not render well for me (see below), we should revisit this again before alpha release.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, vegalite delenda est

I think we need to opt out of sizing completely for faceted plots

LABEL
title => 'Bill Dimensions by Species',
x => 'Bill Length (mm)',
y => 'Bill Depth (mm)'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think axis labels might be broken in facet plots...

Image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... that should have been fixed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has been fixed. Maybe it just was in main and not here

@georgestagg
Copy link
Collaborator

Not directly related to this PR, but we might want to add this to doc/.gitignore, as Quarto has started making files like examples.quarto_ipynb_1 for me...

**/*.quarto_ipynb_*

@thomasp85 thomasp85 merged commit 1206eed into posit-dev:main Mar 12, 2026
16 of 17 checks passed
@thomasp85 thomasp85 deleted the gallery branch March 12, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants